/**
 * @Author: 陈瑞鹏
 * @Date:   2022-10-21 10:06:48
 * @Last Modified by:   陈瑞鹏
 * @Last Modified time: 2022-10-28 17:58:57
 */
import mongoose from "mongoose";

const Schema = mongoose.Schema;
const DailyTaskSchema: mongoose.Schema = new Schema({
  roleId: { type: Number, desc: "角色Id", index: true },
  id: { type: Number, desc: "任务Id", index: true },
  name: { type: String, desc: "任务名称" },
  target: { type: Number, desc: "任务目标" },
  progress: { type: Number, desc: "进度", default: 0 },
  rewardType: { type: Number, desc: "奖励类型", default: 1 },
  rewardNum: { type: Number, desc: "奖励数量" },
  isReceive: { type: Boolean, desc: "是否领取", default: false },
  updateTime: { type: String, display: '更新时间', default: "" },
}, { versionKey: false }).index({ roleId: 1, id: 1 });

const DailyTask = mongoose.model("DailyTask", DailyTaskSchema);
export default DailyTask;